package cn.stylefeng.guns.modular.gridsystem.model.param;

import cn.stylefeng.guns.core.pojo.base.param.BaseParam;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 网关固件表
 *
 * @author zxw
 * @date 2022/11/03 11:41
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class GatewayFirmwareParam extends BaseParam {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = {edit.class})
    private Long id;

    /**
     * 所属站点ID
     */
    @NotNull(message = "所属站点主键不能为空", groups = {edit.class})
    private Integer stationId;
    /**
     * 固件名称
     */
    @NotNull(message = "固件名称不能为空", groups = {add.class, edit.class})
    @Size(max = 200, message = "固件名称超过最大长度200", groups = {add.class, edit.class})
    private String firmwareName;

    /**
     * 版本号
     */
    @NotNull(message = "版本号不能为空", groups = {add.class, edit.class})
    private Integer versionNumber;

    /**
     * 版本名称
     */
    @NotNull(message = "版本名称不能为空", groups = {add.class, edit.class})
    @Size(max = 100, message = "版本名称超过最大长度100", groups = {add.class, edit.class})
    private String versionName;

    /**
     * 更新内容
     */
    @NotNull(message = "更新内容不能为空", groups = {add.class, edit.class})
    private String updateRemark;

    /**
     * application附件
     */
    @NotNull(message = "application附件不能为空", groups = {add.class, edit.class})
    private Long applicationFileId;

    /**
     * agent附件
     */
    @NotNull(message = "agent附件不能为空", groups = {add.class, edit.class})
    private Long agentFileId;

    /**
     * 数据库文件
     */
    private Long accessFileId;

    /**
     * 关联网关主键集合
     */
    @NotNull(message = "关联网关不能为空", groups = {add.class, edit.class})
    private List<Integer> gatewayIds;

    /**
     * 网关主键
     */
    private Integer gatewayId;

    /**
     * 固件状态：0-待确认，1-已确认
     */
    private String firmwareStatus;

}
